package com.simple.piger.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * CMS【系统模块】角色权限关联表
 * @Author  donghj
 * @Date    2017/11/20 20:18
 */
@Data
@TableName("cms_sys_role_permission")
public class CmsSysRolePermission extends Model<CmsSysRolePermission> {
    /**
     * 主键
     */
	@TableId(type = IdType.AUTO)
	private Integer id;
    /**
     * 角色主键
     */
	@TableField("role_id")
	private Integer roleId;
    /**
     * 权限主键
     */
	@TableField("permission_id")
	private Integer permissionId;
	/**
	 * 权限父菜单主键
	 */
	@TableField(value = "parent_id", exist = false)
	private Integer parentId;
	/**
	 * 权限名称
	 */
	@TableField(exist = false)
	private String name;
	/**
	 * 权限类型
	 */
	@TableField(exist = false)
	private Integer type;
	/**
	 * 权限值
	 */
	@TableField(exist = false)
	private String value;
	/**
     * 权限路径
	 */
	@TableField(exist = false)
	private String url;

	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}